const mysql = require("mysql");
const con = mysql.createConnection({
  host: "localhost",
  user: "root",
  password: "asj961205",
  port: "3306",
  database: "myblog",
});
con.connect();
const sql = "select * from blogs;";
// const sql =
//   "insert into blogs (title,content,createtime,author) values('biaoti','contentc',131313131,'zhangsan');";
// insertId affectedRows
con.query(sql, (err, result) => {
  if (err) {
    console.error(err);
  }
  console.log(result);
});
con.end();
